home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 37
/
037.d81
/
ragtime jukebox
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
4KB
|
160 lines
0 tp$="":sys65418:poke54296,.
1 poke53281,1:poke53280,6
2 ifx=0thenx=1:print"[147][144]"spc(10)"[212]uning the piano...":load"sid.obj",8,1
3 ifx=1thenx=2:load"input any.o",8,1
4 sa=780:sx=781:sy=782
5 poke53280,6:poke53281,1
6 s$=" "
7 td$=""
10 print"[147]"
20 print" [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
30 print" [221][204]oadstar presents[221][144] "
40 print" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][144] "
50 print" "
60 print:print
70 gosub8000
180 print
190 print" [154][160] (c) 1987"
200 print"[154][160]"
210 print"[160] [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
220 print"[154][160] [221] [208][210][197][211][211] [193][206][217] [203][197][217] [221][144] "
230 print" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][144][160]"
240 print" "
250 print"";
260 poke198,0:wait198,1:poke198,0:jo=56320
270 ns=8:dimf$(ns),r$(ns),t$(30):di=int(ns/2)
272 sp=1
280 forx=1tons:readf$(x),r$(x):next
290 :
291 data "[212]op [204]iner",top liner.mus
292 :
293 data "[203]itten [207]n [212]he [203]eys",kitten keys.mus
294 data "[204]ittle [210]ock [199]etaway",littlerock.mus
295 data "[208]atricia [210]ag",patricia.mus
296 data "[200]obson [211]t. [194]lues",hobson st..mus
297 data "[194]ohemia [210]ag",bohemia.mus
298 data "[211]olace",solace.mus
299 data "[200]eliotrope [194]ouquet",heliotrope.mus
300 print"[147]"
302 gosub8000
330 :
340 print" [213]se [195]ursor keys or [202]oystick to move"
342 print" the highlight to the song you want."
344 print" [208]ress [[210][197][212][213][210][206]] or [198]irebutton to"
346 print" select the highlighted tune."
348 print"[144] [[208]ress '\' to exit]"
350 :
400 gosub1000: rem plot titles
410 gosub2000: rem get key
420 ifsp=ns+1then3000: rem play all
430 gosub4000: rem play tune at sp
440 goto300
450 :
1000 rem plot titles
1005 print""
1010 forx=1todi
1020 print"[146] ";:ifx=spthenprint"[154]";
1030 printf$(x);
1040 print"[146]";:ifx+di=spthenprint"[154]";
1050 printspc(21-len(f$(x)))f$(x+di)
1060 next
1070 print"[146]";:ifsp=ns+1thenprint"[154]";
1080 printspc(14)"[208][204][193][217] [193][204][204]"
1090 return
1094 :
2000 rem get key
2005 k=peek(198):j=peek(jo)
2010 ifk=0andj=127then2005
2020 getk$
2025 ifk$=chr$(13)orj=111then2100
2030 ifk$=""orj=125thensp=sp+1
2040 ifk$="[145]"orj=126thensp=sp-1
2045 ifk$=""orj=119thensp=sp+di
2050 ifk$="[157]"orj=123thensp=sp-di
2055 ifk$="\"then5000 : rem quit
2060 ifsp<1thensp=1
2070 ifsp>ns+1thensp=ns+1
2080 gosub1000:goto2005
2090 :
2100 return
2110 :
3000 rem play all
3005 sp=1
3020 f$=r$(sp):gosub6000
3030 gosub7000
3040 iffl=0thensp=sp+1:ifsp<=nsthen3020
3050 goto300
3060 :
4000 rem play song sp
4010 f$=r$(sp)
4020 gosub 6000
4030 gosub 7000
4040 goto300
4050 :
5000 rem quit
5010 print"[147]":gosub 8000
5020 print" [193]re you sure you want to quit [[217]/[206]]?"
5022 poke198,0:wait198,1:getag$
5024 ifag$="y"orag$="[217]"then60000
5026 ifag$="n"orag$="[206]"then300
5028 goto5022
6000 pokesa,1:pokesx,8:pokesy,0:sys65466
6008 for k=1 to len(f$):poke 584+k,asc(mid$(f$,k)):next
6010 poke sa,len(f$):poke sx,73:poke sy,2:sys 65469
6012 pokesa,0:pokesx,0:pokesy,32:sys65493
6014 f$="t."+r$(sp):open2,8,2,f$:get#2,a$,b$:input#2,nl
6016 forx=1tonl:sys828,2,38:t$(x)=tp$+"":next:close2
6018 return
6020 :
7000 rem play it
7002 print"[147]":gosub8000:gosub9000
7010 sys49435:pokesx,0:pokesy,32:sys49458:poke49152,7
7020 ifpeek(198)=0and((peek(49152)and7)=7)andpeek(jo)=127then7020
7021 if(peek(jo)and16)=.thenfl=1:goto7030
7022 fl=0:if(peek(49152)and7)<>7then7030
7025 gc=0:getag$:gc=1:j=peek(jo):gosub10000
7028 iffl=1then7030
7029 goto7020
7030 poke49152,0
7040 poke54276,0:poke54283,0
7050 poke54290,0:sys49629
7060 return
7070 :
8000 rem boxer
8004 print" [154] "
8006 print" [154] [144] "
8008 print" [154] [210]agtime [202]ukebox [154] [144] "
8010 print" [154] [160] [160][154][160] [144] "
8012 print" [154] [160] [154] [144] "
8014 print" [154] [144] "
8016 print" [154] [193]ll music [144] "
8018 print" [154] transcribed by [202]ohn [210]oache [144] "
8020 print" [154] [144] "
8022 print" "
8024 return
9000 print" [195]ursor keys or joystick scroll"
9001 print" [208]ress [\] or [198][201][210][197][194][213][212][212][207][206] to exit."
9002 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
9003 fori=1to6:print"[221]";spc(38)"[221]";:next
9004 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]";
9006 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
9007 print"[221]"spc(38)"[221]";
9008 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]";
9009 print"[145][145]";spc(20-len(f$(sp))/2);f$(sp);
9010 lp=1:goto10050
9020 :
10000 rem deal with scrolling...
10010 ifag$=""orj=125thenlp=lp+1
10020 ifag$="[145]"orj=126thenlp=lp-1
10030 ifag$="\"thenfl=1:goto10100
10040 iflp>nl-5thenlp=nl-5
10045 iflp<1thenlp=1
10050 forx=217to242:pokex,128orpeek(x):next:printtd$:forx=lptolp+5
10060 print""t$(x)left$(s$,38-len(t$(x)))
10070 next
10100 return
60000 rem return
60010 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
60020 ifer<>63thenend
60025 load"hello connect",8